package com.scs.application.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * 定时任务日志
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "定时任务日志表")
@TableName("sys_schedule_log")
@EntityIndexAnnotation(ix = {"job_name,job_group"})
public class ScheduleLog extends SimpleDataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "任务名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String jobName;

    @EntityFieldAnnotation(
            text = "任务组名",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String jobGroup;

    @EntityFieldAnnotation(
            text = "日志类型",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String logType;

    @EntityFieldAnnotation(
            text = "日志事件",
            length = "200",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String jobEvent;

    @EntityFieldAnnotation(
            text = "日志信息",
            length = "500",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String jobMessage;

    @EntityFieldAnnotation(
            text = "是否异常",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Boolean flagException;

    @EntityFieldAnnotation(
            type = EntityFieldType.TEXT,
            text = "异常信息",
            length = "65535",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String exceptionInfo;


    // gmt_create ,在父类中处理

}
